Minor cleanup/merge conflicts
Allow to specify the release mode - NEVER, ALWAYS, WHEN_EMPTY
Remove deprecated exceptions