Add filtering option for trial conditions, change environments to use proper variable type

Post commit code review : Chezka Arevalo