Enhance the documentation, derived from aliakhtar's branch