Some input and validation enchancement stuff