Refactored out the view logic to smaller files