AST extraction and QDAS structure changes

The queues and blocks needs to be declared in the main (no were else),
only the variables can still be global.

The dispatch and queue represented with inheritance.