Added pagination partial and some bug fixes