Added setState to check inputs, closes #18