first round of code improvements ; ce module 

Generic code quality improvements, based on feedback check style, find bugs, pmd etc...