Argument validation and more tests