Added some validation. Pretty much done with v1.