Add slim support

We also included a unit test.