refactored js to new format, added grunt modules and package file