front-end: Surround paulscode-specific code with PAULSCODE symbol.

Also pulled in some upstream code so it's easy to see the diff at a
glance.