Basically working now!  Some clean up and error checking remains