Improve formatting of code