Added global integer declarations and printing