Added comments to documents and remove misc. codes