Add `expandResources` and tests, sample data
Minor code style cleanup
Include resource expansion in middleware route def processing