Refactored texture handling

- Extracted texture storage and handling into its own class
- Flipped the image upright