Comments

Added some comments and created a main function.