Updated dependencies.
Pulled out code in a local variable.