Added some comments and a getRootPath method.