Needs integration with GUI

Re-implemented validation functions.  It should work, although I have not been able to test it on my own (need at least 2 people working on the task).