A bunch more api controller refactoring.