updated all to read the properties file and did some refactoring