spark frontend reorganize