TODO: Refactoring into a model