Added NLP support. Minor bug fixes.