Updated UI, changed reduction function slightly