General refacoring.