A few improvments and one bug fix

See git labels...