Implemented screen buffering