fixed typos and general code "cleaning"