Fix and add more documentation