moved static globals in main.c into a Model struct