Corrections to get things to compile/work again
wrap up and comments added