Format and added documentation