collectgarbage calling reduced

some minor improvements