Added almost all functionality to main. Added functions done by Juan and an updated common header file.
Merge remote-tracking branch 'Assn4Repository/master'