extracted Shell class
fixed doctests