Move tool functions to bridged Mog and update whole code and samples