some optimizations and code cleanup; symmetric score computation, seg masking similar to blastp