Update how line references are handles

Removed reference service in favour of event emitters
Fixed creating issues
Updated diff, file, and graphh directive