UPDATED refactored the models as angular services.