Misc improvements by Marcel F
Some changes to Marcel F's improvements