Standalone refactored.