Added code for companies array and category dependencies