New features from master branch (minimal compatibility)