Minor tweaks noted in cleanup
Untested fix to Fortran bounds violation noted by Ripley.