more refactoring, added spritebuffermanager stuff