Add expand/contract for functions and arrays

I added the functions for expand/contract for functions and arrays, bound them to keys that seemed reasonable, updated the README, and added a lot more tests to the relevant .feature file.