fixes z-index issues
add mode to config
rely on config instead of button visibility
add base resize function