Fix newlines and tests