Issue #18 - Improved validation