Converts function and its member definitions to ES6 class