Working on compile. Fixed error that was being caused when referncing optimize.py