partial fix for #39: removed unused variable and dead code
removed dead code