modulating code and adding physics tests

added tile collision
moved code into entities and level
added gravity
fixed bug where low frame limits would stop the trail from working