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