Tidied some global object-related stuff