Split the program.cs into appropriate class files and added comments