various improvements and bugfixes

see individual changes