Added documentation and fixed includes