Separated main into new file (main.cpp)

Also updated Makefile to reflect that.