Seperated Map stuff into its own class.
Added a class for using a local database