Added more tests, replaced array holding patterns with a hash and clearer symbols.