docstrings and code format from !1436
@FestplattenSchnitzel I took your commits from !1436 (closed) that can be merged and put them here, so they don't bitrot.
@FestplattenSchnitzel I took your commits from !1436 (closed) that can be merged and put them here, so they don't bitrot.