Simplify match logic

User end_with? and don't test the short-name first, it is just confusing. One
crack at #91 

@dekz