refactored shell to remove duplicate code such that the standard library is always there