update grunt; restructure js