declare all variables at the top, remove unnecessary funcs after moving to overlay