Tweak tail clipping algorithm; update test cases for value-projection; fix bugs