Made the infrastructure of the API! WIP

Make the stuff in master!