UPDATE: Refactored code
UPDATE: Changed styling