Finish implementing use of 'compile_primary' and 'compile_secondary' subroutines

The subroutines are now used symmetrically
Some efficiency work can still be done on the default 'ps' and 'pdf targets