Improve REST API, more and more tests