Comments and updated UML

Updated the UML and added some comments.