Modularized JS, added grunt and test