elif replaces an if in a couple of places. Parser comments re-written.