Refactored map code, added inventory