Update AR.py

1. Function for removing workspace was added.
2. Comments to some functions were added.
3. Exit code was added to all workspace's functions.