Made a simple singleton texture manager and changed rect to use it.