Improved debug output
Added const where needed
Merge pull request #196 from davetcoleman/minor_changes

Added necessary const to recently added function