resolves #78. code cleanup in prep for merge to master.