Minor refractoring and HDFS configuration loaded from file