Tidied up checking of model in main