Added functions getBufferHeight and getBufferWidth