Commented code, and added sample queries