Pervasive renames to internals.

The goals here are to:
 1. Move away from the temporary Pirate* prefixed names.
 2. Make thinks consistent throughout.
 3. Make things read ok.
 4. Avoid name clashes with standard library.