Source code tidy up