Implemented a first version of the API we discussed in the GDocs chat