Added some documentation, mostly ported from the old documentation