Added error checking for reserved words and repeated names fixes #1 fixes #2