Cleaned up some code, and added a point of entry for physics handling