removes unneeded objects