Added unit tests for `json.csv()`, initial refactoring of `cookie{}` to support a server environment