These changes refactor the router handling into its own package to keep main.go clean. Also API handlers are here refactored to their corresponding files.