Passing line number in line, moved shared function to shared.cc