closes #9. Exit codes added