Added 'optimize.cpp'. First attempt at BFGS minimization.
Working version. Need to verify correctness of results.
cleanup