Workaround the player NPE and corrected the syntax errors. There is still a problem around the Player direction update.