API corrections and some documentation