Fixed more resolving tests.
Cleaned up more code.