Added cast
Refactored TikZ output code
Refactored some code. Have to determine consec_num in dag-construct
Improved (?) and corrected TikZ output