Purges are now made to location:port specified in settings
Clean up config handling and fixed small bugg