Removed dead code closes #1377