Made a few changes, added a few variables.