Put most of the code in the Shelly monad

So we only need to call shelly once
Also, make the tests run with shellyNoDir