small improvements, code cleanup, bugfix for preforking with inner objects