Clean extension code