Optimizations to sprite drawing

Removal of some unnecessary code.