Delete unused type lookups
Use static type checker for inferencing where possible