added cleanup() to remove objects that are not needed.