Added padded query length variable
Removed target padding in NW and fixed boundaries