Refactor shell

m8