Finished and tested the API