Tidied up code and corrected style inconsistencies. Added lots of comments
Style and comments, bit of tidying up