changes in infopanel, cleaned up code