Fixed bad buffer size assumption in window.c and also tried to help stuttering and frame performance.