Additional validation and unit tests