Added some basic validation