Turned on more warnings, and fixed the errors. Moved common.h, which includes