Set options in properties file, Code refactoring