Various updates and bugfixes