Added detailed documentation