Got basic window opening function working