More work on the Semantic Analyser, still needs type checking