Updated copyright notices, changed tabs to spaces, removed surplus whitespace, and aligned case, when, and end lines.