Began extensive rewrite including rewritten main() and moving samples to an object.