fixed a typo, tidied up more minor details