Minor code cleanup

Added some closing brace comments to long functions / blocks.