Add exit command. Misc other changes.