Dev

Various bugfixes