Moved test code into new directory
Started rewrite of code into a maintainable form.