GlobalFunctions Class

Added a class to handle organisation of classes called by different
pages. Less code, easier to follow.