Added some documentation, and fixed an issue with missing backslashes on some statements