Add schemas code

The `.toList` should now be superfluous.
Also we tend to only use `{` in functions for pattern matching i.e. `case` or blocks of code.