Added Map class.
Removed some old code.
Refactoring