Updated formatting. Added more documentation.