app: fix trimap drawing and some cleanup