Added singleton code (from community wiki) and create a singleton object (GlobalObjects) that you can access form anywhere