Library rebuilt and simplified