Various minor improvments