First pass.
Check for terminal condition
Broken. Blast referenced before assignment.
Fix terminal condition
Remove terminal check on blast
cleanup
Merge pull request #10 from VertNet/feature/nextidbug

Feature/nextidbug  tested locally.