Clean up completion code