Small refactoring and order exception handling