small improvement to interpolation, some code cleanup
make refresh rate configurable