Add Qt::WA_OpaquePaintEvent attribute to get rid of flickering

Also, some cleanup
Remove medFlicker, wasn't useful nor used