Miscellaneous fixes. Started work on removing sprites when they are no longer needed.