Added preliminar syntax checking