Better coherent with module system, with minor cleanup.