services: refactoring & added namespace