Added validation, and demo works