added AngularJS and fixed to object capsulation