Bring r27806 from trunk to branch. Also, some minor code cleanups.
Tested on:
MacOSX/64 10.10.5 (amazon) w/serial
(h5committest not required on this branch)
113 B
113 B