Added additional comments for most of the methods.