more refactoring, and add pgp-create/pgp-preview selected student linkage
refactor notes-controller