updated maintenance mode plugin to be more self contained