made it so edit functions only accessible when edit tab is open