Typed static queries

I'm opening this PR so we can discuss the current state of the implementation.
Is there any reason (classpath problems?) why you're loading a file directly instead of just getting the default Config?