Eliminate absolute imports in the library (tests get to keep them).
Support <main>.