Various improvements, mostly documentation