Adding comments, some tidying etc