refactor(main.rs): split codebase into multiple files