Refactored texture resource management to a separate class. Made sure resources that are created are also destroyed when the app shuts down