Made changes to clean up variables