Added resetLayout method.