NOREF: Starting a complete rewrite of this module