Update how line references are handled

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