Move config to a separate file; Code cleanup.