made collapsable simpler, with toggle-able css class, fixed  query parsing