optimizations, cleanup, lots of todos

actually works, if only for very simple fields. Lots of bugs, todos and fixes to work in, this is a fun exercise