NEW: Seperate API controller class.