Removing copy/pasta code and extraneous newlines.