Code refactored; using decorations. Test cases for models.