Signatures typing

This pull request goes through all method signatures and adds explicit types to parameters and return types where possible. This helps clarify the intent of the code, as well as help IDE auto-complete. I think it also speeds up execution because groovy doesn't have to use dynamic binding at run-time, but can instead static bind to the right method at compile-time.

Also fixed a test that wasn't cleaning up.