seems all functionalities of this file can be done in panel.js