Added cube map loading (requires a 3d model of a sphere or cube). Minor refactoring.