Fix compilation errors and code review cleanup!
Move model level concerns to model