Added renamer function
Refactored infer