clean up sprite code