move overlay into its own function
minor cleanup
Merge branch 'master' into refactor