Commited from online IDE
Added some documentary details of the methods to detail their purpose