refactor everything as angular services