Removing unnecessary layouts.