Started refactoring map code to read from lua