Changed vector inputs into reference inputs in all places possible