Code cleaning
Refactoring using CDI
Add runtime dependencies
NPE protection
cleaning