fix td/th mistake in table header
refactor js function names
move "add filter" link to the end of the form