fixed some gui latency
added minimize and close buttons