bit of a refactor in order to hopefully make it easier to actually support another language in practice
removed unused files and refactored complex method
code tidying