fix spelling of 'entities' and a few comments