Cleaned up dependencies.
Fixes to automatic refresh logic.
Cleaned up configuration.