Added code and documentation.