Add better regex checks for queries. Also add the dynamic viewer.