Add resolve(), move tests.
1.0.4