Cleaning out unused vars and code formating