Broke up code into functions
Moved arg parser into a function
Added generator to read input file
Added input generator to write_crossings_file
Refactored to split up finding transitions and writing them
Refactored to include a main step in main
Added comment on initial value and did slight style refactoring