Refactored for data binding.