Removed unused code.
Added a "math.contains()" Function
Added "onDestroy()" callbacks for objects when they're destroyed.
Added Object cleanup when state is switched.
Changed tiles to local variables instead of global.
Fixed bug with "debug.err()".