Refactored out models into separate common module.