removed layout class

Now function of pislice, unnecessary recursion.