-- remove unused local variables + small refactor.