added flexbox and moved flag and media modules to layout