Cleaned up dependencies, configuration and auto-refresh logic.