Deleting unused code. Fixing bug with modal showing up when not asked for.