Allow station IDs to be set externally thus sepparating internal and external station ids.
Add unique IDs to lines and do some refactoring