SUBJECT: Close to perfect.

Have inserted functions to perform validations. Now,
all that is left to do is call these functions at proper
and to make use of the return values.