Some cleanup on the angular code