Refactored validation (backward compability broken :( )