Removed unused variable and cleaned up var names