Added exitoption and documentation