Properly sanitize guid; remove unused variable