using const where applicable.
moved int queue printing to make output more readable.