Removed unnecessary functions in panel, code cleanup