Improve comments, fix issues, clean up code.