Patch sprite bugs and add tests
Test coverage