added more info on literal and uri lengths
refactored some code (renamed vars for consistency, removed unused stats, and optimized some small pieces of code