Restructure frontend