Add Gruntfile, JSHint, JSBeautify

Clean up code somewhat.
Set up project structure properly
Use .jshintrc for Grunt
Add test to retrieve id from xal