Merge from Markus' branch