Refactored, added comments, created header file for main
Removed test messages