This is a fork of optimization part of RISO project (http://riso.sourceforge.net/)