remove the if statement at prepareFrontEnd I think it's no use
adding some todos
totally rewritten