Mostly working new modal implementation