cleaned up some code. About to try passing gamma back to inferprogram
starting to push the right environments to the variables
tidied up code