The total coordinate ring of a smooth projective surface