Refactored initialize/cleanup sequences