Moved overlay to separate JS