Corrects an error in the previous version which allows meaningless attributes
Expand our library to include Table and Href; Factor generic code to achieve code reuse and avoid code duplication.