Better semicolon removing code
Strip trailing whitespace