more cleanup
add pause button
reoptimize support