added $codesnip and changed the place of the notepad logic