Added gauge fixing code