refactor services to use cdi