wip. finished a nice refactor
wip. prepare to rebaseready to rebase.