Improve the standardisation of the code, using a common pre-commit config (but without adding the config to the repo for now, due to numerous failures with typing etc.)