Replace varying and attribute variables with in and out ones