Revisions of #1518

Contributors: Dennis Hackethal

Improved in #1515 but could still be better.

Improved in #1515 but could still be better.

Improved since #1515 but could still be better.