Minor changes, lots of documentation added.