Fixed getLCS, added test cases.