major cleanup

almost a re-init of this module