add comments, clean up unnecessary things