Add test for html.
Change to dep caused test fails.
Changing condition system to be simpler and more lenient
Removing unnecessary function.