Added painter. Segfaults when paint button is clicked.