move some formatting from controller to mason component.