updated more documentation and fixed some small bugs