changed scope of link function. It can now consume services injected from constructor.