Removed an unused variable and a duplicate in data