json output modified - returns all kinds of links
fixed bug in json generation