Added cookie to save the selected primers

Cookie can be saved and primers reset. Tidying, refactoring, and build
complete.