More fixes -- split fmin wrapper into seperate module.