Finding accounting hash by key, de-pointerizing accounting_id and adding...

... accounting ids dynamically
Perhaps #define BUFSIZE so that we don't have the magic numbers (256, 255, ...)