Updated to AngularJs