Clean up more code in frontend.c