Made more object-oriented.
Optimised loading textures a bit.
Did some minor cleaning.