Move flatten to settings