Improve repaint. Small fixes. Add build configuration.