Added more code
Added tidylib stuff with testcase