Basic structure, support fixmap (untested)
Passes the tests but the code is awful
Lots of refactoring. Still a few things to improve.