It seems like the code between this file and Panel.js are duplicated. Is there any specific reason for this, or could they be reused?