More work in progress.  Doesn't compile and has lots of issues.