Adopted Veritrope's script

Brought in code from http://veritrope.com/, will use as a basis for
future modifications