Server side changes.

- Cleaned up use fold on Options that return validations.
- Study service now checks that the study ID in many of the read side functions.
- Added test for routes that have optional parameters.