Fix broken enum declarations, etc.