Begin user input validation (and some fixes)