added pretty printing for JSON, cleaned up controllers and views for displaying and editing. This closes #75 and #54