Several small improvements