typos, naming, remove unused code, identation