Added validation.

Basic validation added to the handler functions for create-post and create-thread.
Some debug items also changed.
Error handlers for the create-* functions made more uniform, although these may be removed at a later date for privacy and/or security.