Moved Panel function in a new file