Democracy is a design problem: How changes in design change the outcome of elections