Adds actions (up, down, left, right) plus some map code refactoring.