Fixed some errors in coding preventing compile. Need to figure out how to get extern to function properly