Fixed the extern definitions and alltoupper