remove useless code and add angularjs