Finally got around to committing the first part of the type checking visitor mechanism as well as some refactorings after the motherboard of my laptop broke :(