restructuring

- still not very testable, merely a spike :(