First cut of ApiController and related code