refactor bookmark and config file handling