Modified in accordance to coding guidelines for header and C files.