Restructure frontend libraries