Refactoring protonym code.