Refactoring Native and User Functions