Optimized GUI

Instead of painting every block each turn, blocks are re-painted only
when changes are made.