added derived feature validator
refactoring and cleanup