NOREF: Modernizing this module and rewriting it