fixed some of main.cpp, system.*, and physics.*

Still have many compiler errors ...