Move filtering logic for maintenances into the entity check
Split out boundary checks for maintenance windows, refactor time constants