wip: major refactor, probably broke some things, step towards real OO approach @wip