Format and cleanup