Adding Global Loading and cleaning up some code.