Add slicing and integer indexing (over the first axis).

Some simple tests for both.

Move more extent and array operations to the function level.
Try to rename things to be a little clearer.