[frontend] Rework more stuff.