refactor unused variables and initialized variable warnings

refactor unused variables and initialized variable warnings in several parts of code to respond to issue 339 (https://github.com/cucumber/cucumber/issues/339)