TCF Core: code cleanup