Refactored code into a factory
Styling and two separate code renderings