Working version, without download route. Rearranged controllers into
services, wrote controller tests. Still haven't tested the provider code
yet though.