Added more documentation and fixed a small bug<eom>


Thanks!