Changed modal standard function to settings and made it more flexible.