[frontend] Some more reorganization.