Refactor tastypie api, added history app and widget