updated tool, reapplied MaidSafe changes and added some fixes for std::function etc.