Refactor handling of method result naming