Removes unused query
Removes permalink usage