More code duplication cleanup on embind