Reordering

Nothing big, just changed the order of things and added comments