Started converting some javascript to angularJs.