Cleans-up and annotate the code.