Changing from test code to application build

First commit moving from test code to a functional program.  Most test
code is left commented out so it can be used later more appropriately.