Refactoring : remove code duplicates between click and clicklink