WIP. further cleanup.