Overhaul of spritecode handling and entities, restructured for ease of
use and simplicity