refactor source location data structures