Applies diverse bugfixes

This commit applies multiple extensions and bugfixes
from the devel branch.