Added some documentation and changed some formatting.