Refactor and improvements

Followed advice from last pull req and improved it some more.

- removed jQuery dependency
- improved documentation
- added more wildcards
- added wilcard function - now much DRYer
-