Fixed our big and heavy bug, finally!
Some small cleanup and bugfixes