issue #545 and #1013 resolved
delete dead commented code
Merge pull request #1016 from nmccready/master

issue 545 and 1013