Build fixes to enable building

When I first cloned this project, I was unable to build it, and then run it properly.  The PR is to merge in changes that I made in my forked copy to repair those issues.