additional API docs, starting documentation on the write functions of the API.
(also modified a forgotten remnant of the original masterdaemon template we used to be more generic)