added plotting for the primer. refactored common functions for nix in base class