wip: refactor into imports and sources