refactor creation of CLR func proxy for code reuse
enhance build scripts