Splitting into two libraries for easier testing.