moved code into own library
added command to build standalone script
changed test script to use module
documented new build process