Using Nearest texture filtering, and refactored code