Style and templates changed to use flexbox.