Added some code to shell, needs rewriting