refactor services file structure