Refactored models to use promises