Some more random corrections, refactorings and documentation
improvements.
Added field validation to the edit boxes.