created a Modal class for working with popups, you can now have multiple windows open at once, layering is a little funny because it only uses two zindex to split between active and passive windows, but it works.