more cleanup and fixed typos