Basically an entire re-write.

Development completed and have tested a number of times with success.

Needs more logging.