Split the frontend code into panel and controller parts, so that it's easier to manage multi sessions, import/export