Apply layout