Add tests for cast operations
Test control transfer instructions
Refactor Terminator classes a bit