Minor changes

- Created unit tests for `state`
- Added support for `Functions` as a value for `datastore.select()` / `datalist.where`