Fixed SEGFAULT on invalid syntax
WIP: Added docs, minor cleanup
Fixed some memory leaks and other problems; More docs