Add first attempt of semantic analyser
Fix flake8 and other mistakes