Added panel controller with functions