Refactored model structure + tests