Added documentation
Fixed types