More tests. Some bug fixes. Pointer decoding is broken.