[issue1003] Improve style for create and main pages, add create form

It's a bit odd to have this inner function here; since it doesn't require any of the local variables, I'd prefer to see it moved up into a top-level declaration in this module.