Replaced global.h with Model structure