fixed typos, inconsistent references etc.