Moved the extern declaration to the correct place