Fix implicit and explicit keygroups issue in #4.
Does everything look good @BurntSushi?