Bugfixes

Bugfixes regarding the new code layout