Moved code to load overlay