Fixed delegate grammar, implemented more message handlers.