cleanup, add comments