WIP: refactor into sources and imports