Use latest version of affinity.
Remove double and triple blank lines
Remove blank lines before }
Remove blank lines at the start of methods and loops.