cleanups and support the two models