Updated tests and added some comments