Moves api v1 code into its own package