Added system prompt (+ some bug fixes).