Cleaned up the graphics engine
- Refactored window.RenderMode to mode.GraphicsMode
- Consolidated redundant try-catch clauses