kaminari, some jquery and refactor