Final changes + code reformatting