Adding sorting and filtering to tables