Residual stopping criteria
Removed "ProxableFunction" in favor of trait Prox

Still need to figure out
a) if this works
b) how to get length of opt variable cleanly.

Should the functions know the length of the opt variable?