Added logic to mini layouts