fix issue #1 and #2
fix indentions
remove code comments
Merge pull request #3 from lisps/master

fix wildcards and group encoding problems