kaminari and some cleanup