Completely rewrote it. Window is white instead of black for some reason.