Refactoring and clean up for launch