Latest build.  Logging not yet implemented.  Still some minor bugs.

Thorough testing still needed and more error handling required.