Update variable names and make some small updates