Config: moved to lib/tools; finishing and adding tests.