Added support for indexing in the "slice" command. Wee!

Also added a "flatten" command for convenient record viewing.