Added ExtendedLCS class to generalise the operations