Merge improvements from master