Fixes #11. Uses the 'play' event instead of the 'loadedalldata' one.

Also refactored the init commands so that they aren't duplicated.