CaychyDecode wrapped; bugs fixed; tests written