Wrote simple LCS funcion. It doesn't work quite as I'd like, but the API makes that difficult.