Remove a bunch of implicity 'any's.

Uncovered via the -noImplicitAny flag.
Seems like there was a bug in our method reset