Adds the main theory chapter.
Fixes minor errors.
Improves overall result.