added categories release in dealloc, decoding and encoding of categories