Fixed some formatting and added documentation