fix whitespace, add comments