Cleaning up; formatting, code inspection