Added codes.
Added documentation.