Added comments and changed some names