Large commit with multiple bugfixes