restructured code

- separate prefs and key configuration files