Add helper function to build controls