Implemented grammar merging and module handling.

Some upgrades to greeter module.