refactored a lot of code, started adding map reading capabilities