Refactored map functions into seperate file, at some point should refactor again to use application singleton, maybe, more research needed