refactoring: remove an used variable and a function (#492)