Refactored into a more stable model