#862 Add pagination and other features to index: note to self: this can't stay like this
#862 Fix queries when no id is given, can't stay like this either