Changed the chars allowed as rule placeholder.
Some minor code cleanup.