Misc

Small bugfixes, cleanups, test speed-ups, re-enabling compiler warnings, polishing.