Added some inline comments, haddoc style