Refactoring; added interface; added settings.