Fixed issues with the transition of the world when the character moved off screen

Also did a fair few changes to where the logic of the transition between screens was performed.