Code cleanup, opt stg synthesis.
Thesis: first 3 sections are FINAL!