Clean up whitespace and add copyright headers