Ui pagination

This fixes issue #28