Bug fixes.
Cleaned search queries and added some stuff to prevent injections.