Did some commenting, still needs more tidying before submission.