Added pagination with kaminari. Other format changes