Update loading directive and general clean up.