Added integer decoding and relevant test.