Fix error & refactor

-fix error callback from function "afterMove"
-refactor pagination click function