Fix Mads's code to not give errors. Create a Position class, to handle positions.