Some cleanup and added some AMD wrapping to Gruntfile