refactoring to stave off technical debt so I can make the clugey mobile layout work