Feature fix, speed improvement

I had some code that wasn't doing anything and needed to be in another
function, so I moved it which should result in some speedup. I also
changed how I make indices for dataframes from strings which I think
will give a minor speedup.
Speed improvement, debugging statements present

I put in some debugging statements so I can figure out what parts are
taking time. I'm still using them so I'll leave them in for now.
Speedup

I changed the function that finds which junctions to keep. I think it
will be faster.