Added options to config file, create factory application and improve structure of the application