semantic: Remove refrep and fold functionality into exptyper.

I also fixed import test 24 and aggregate test 10
while doing the refactoring.
semantic: Fix up old lookups with refactored calls.