Added documentation (again)

And also removed some stupid mistakes. But let's not dwell on that.