Optimized timer for speed. Updated Layer, added functions for managing units. Fixed problem where generated textures were calling addEventListener and removeEventListener every frame.