SpriteEngine/GameEngine: Enhance debugging ability, code cleanup