Fixing the input and grammar problems. Closes #29