Added some documentation, tweaked other stuff.