Added some comments, changed some names