Map editor tests

refactored editor, added several tests, restructured some of the older tests too