Refactor - simplify input verification