remove unnecessary inputs in w- directive templates