Add validation for config params + unit tests