Made a public accesible function for sharing data between all views.