Fixed a stupid mistake in the hash's syntax.
Util function matches uses an object attr (dc), so move the functions to main module and methodize them.