Modified structure, runs in devise. Need to readjust y values for new origin.