Add code to load stop sequence data

also some refactoring for better organization