Added arguments validation to applyTo factory methods; updated build