Code refactorings to accomodate typescript's --no-implicit-any option

Note, chai's definitions were updated from DefinitelyTyped
Merge pull request #390 from Icenium/totev/no-implicit-any

Code refactorings to accomodate typescript's --no-implicit-any option