Added more notes to code