Correcting sign in padding function.
Re-add tests.