collectgarbage, code style, doc updates