Fix guide form
Add leave message function

And some cleanup.