refactor magic string; config cleanup