Simplify rewrite

Quite a major overhaul of Nota for our internal purposes, all credits to @joostverdoorn for the code effort

Could you check whether the diff is OK so we can merge it into master?