Updated documentation, licences and comments.