fixed tests, began rest api mockup