Added comments and renamed stuff