cleanup some code
add simple nearest frame interpolation