Fixed stg_e vs stg_o, and consistently renamed the rest
Thesis: COBRA chapter review + pseudocodes