Fixed a little copypaste bug
Added fillbuffer function
Background is now painted to correct buffer
Some cleanup, no functional changes