do cleanups, draw frame
Merge branch 'tmp'