Move box state related code into model namespace.