Made mass-assignment functions more efficient