added a function to return a string containing GC info, and some other minor changes