Cleanup and reorganization.
Moves errors into module.
put html5 validation back in there (if present)