layout minor changes, add mapping grammars pattern