clean up frontend code, no major changes