Started on time constraints / Refactored panel collapse code