Refactored handlePostForm a little.