Lots of Mappy refactoring