Added sprite creation class, and cleaned up some code.

!!!WARNING!!! MEMORY LEAKS PRESENT!