Logic phase now adds vardecs to start of funtion