refactored to make Model an object singleton rather than trait