fix whitespace and other cleanup