implemented Shell class
improved Shell class, comments and javadocs