May have completed most of functionality. To start error testing. Remove old debug code.