changes so that cost function calculations are faster
made a lot of changes in order to be able to project during Armijo line searches. getting very strange error now in __call__ method of controller