Further updates and refactoring to facilitate animations, sound and other hooks.