Simplify, part 1.
Bugfix.
Simplify, part 2.