Improve api directive, $http.jsonp handling, api template rendering