Improvements in garbage collector: created gc() method to run all
gc-related cleanups in one place, added posibility to run gc in
environments without session