Turned shared layout into directives.