Updated query with variables
Removed commented code
Updated version number
Cleaned up code comments