Improving angular code.
fixing merge conflicts.