use hooks for styles and query selecting. Closes #3