reorganized Angular code.