Added some inline documentation.