Refactored the ViewBuilder for reuse