Added comments throughout