Add transition and literal block handling
Add directive class
Bugfixes in parser; add basic directive parsing