Format codes & add comments