Removing previous instance and some variable adjustments