refactor: split into 3 modules