Loads of comments for JP plus some cleanup!