Local variable placement logic done