Moved stuff to angularjs