Adding some comments to files and refactoring model classes.