Refactor controllers into api namespace.