Updated class diagram and code