Some fixes and new implementation to automatically reload configuration