WIP: many fixes
WIP: simplify