Code cleanup, moved functions to new package. Added command line flag functionality, and reformatted the output.
Update README. Add some comments and update solutions file.