-cleaned up JS and minified with prettify
Added Grid and History API
Merged from trunk