Added documentation and header file