Code cleanup SLIM client side

This makes it a lot easier to reason about Slim.