project: refactor into modules