Keeping track of prev to keep from looping

In createStack, keeping track of the previous layout to ensure it doesn't get caught in an infinite loop.
0.2.10