Altered the arrangement of files in the project

Moved the programs into header files and created a common main function.
The programs are executed based on the user choice.