Added html tidy functionality