refactoring sprite logic, ongoing