Cleaned up the awful code.
Added doxygen support (so far without comments).
Updated doxygen comments to build without warnings.
Updated doxygen comments.
Removed failing (meaningless) test.
Renamed resolve argument.