Fixes and suggestion from Ken Dickey. Thanks, Ken.