Various improvements

Here, have a totally unstructured PR.