refactor: re-architect application directory structure
The project has sufficiently grown out enough to need more structure.
There were certain dependencies that shouldn't have been there such as
some db statements requiring network calls. This has now been fixed.