Fixed and added documentation