get rid of most of the legacy code