removing singleton stuff. Locking bugs. Refresh config