Refactored source type checker