Add main() code, add validation for input model