Added base controller with json convenience methods