Updated error checking + clearing fields