refactor file structure, config for remote server