Allowing altcoin verification, cleanups, tests.

Altcoin support written (donated) by Frederico Reiven, thanks for
that!