small corrections to code in previous commit, and some header files that should have been included in the last commit.