Refactor renderForm function

Remove Control.Monad(void) dependency.
Reduce code duplication in renderForm.
Formatting changes to set*Style functions.