Streamlined code

Streamlined a lot of the code in an attempt to make it more efficient.
Also tried to make the notation more consistent.
Correction to allStructureScores()