Tag class added
minor formatting changes after code review
Refactor to close SQL injection vulnerabilies